<?php


namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;

/**
 * 通用Excel 导出类
 * Class GeneralExport
 * @package App\Exports
 */
class ExcelExport implements FromCollection
{
    private array $excelRows = [];

    public function __construct($excelRows)
    {

        $this->excelRows = $excelRows;
    }

    public function collection()
    {
        return collect($this->excelRows);
    }
}
